﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace city7.lists.set
{
    public partial class FormSETt : Form
    {
        public  bool IsOk;
        public string valueSelect;
        public FormSETt()
        {
            InitializeComponent(); IsOk = false; 
        }
        public FormSETt(
            string s1,
            string s2  )
            : this()
        {
            listBox1.Items.Add(s1);
            listBox1.Items.Add(s2);
            listBox1.Items.Add("->");
            
        }
        public FormSETt(
            string s1, 
            string s2, 
            string s3) 
            : this()
        {
            listBox1.Items.Add(s1);
            listBox1.Items.Add(s2);
            listBox1.Items.Add(s3);
            listBox1.Items.Add("->"); 
        }
        public FormSETt(
            string s1,
            string s2,
            string s3,
            string s4)
            : this()
        {
            listBox1.Items.Add(s1);
            listBox1.Items.Add(s2);
            listBox1.Items.Add(s3);
            listBox1.Items.Add(s4);
            listBox1.Items.Add("->"); 
        }

        private void listBox1_MouseUp(object sender, MouseEventArgs e)
        {
            valueSelect = listBox1.SelectedItem.ToString();
            if (valueSelect == "->")
            {
                IsOk = false;
            }
            else
            {
                IsOk = true;
            }
            this.Close();
        }
    }
}
